<?php 
  $arr = array(
    'tleft' => 'left: 0px; top: 0px;',
    'dleft' => 'left: 0px; bottom: 0px;',
    'tright' => 'right: 0px; top: 0px;',
    'dright' => 'right: 0px; bottom: 0px;',
    'left' => 'left: 0px; top: "+document.body.clientHeight/2+"px;',
    'right' => 'right: 0px; top: "+document.body.clientHeight/2+"px;',
  );
?>
window['diaT'] = art;
function dialog(id, title, param) {
  window['dia'+id] = $.dialog({id:id, title:title, content:"<iframe width='<?php echo $w;?>' height='<?php echo $h;?>' frameBorder=0 scrolling=no  id='chatFrame' src='<?php echo url('chat/index/showFrame');?>&"+param+"'></frame>", padding:''});
}
var str="<div id='dialogChat' style='z-index: 2147483647; position: fixed ! important; <?php echo $arr[$p];?>'>";
str +="<img src='<?php echo __PUBLIC__;?>/chat/images/close.gif' style='position:absolute;cursor:pointer; right:0px; top:0px;' onclick='document.getElementById(\"dialogChat\").style.display=\"none\";' id='LRfloater0close'>";
str +="<?php echo $tpl; ?>";
str +="</div>";
document.write(str);